package MyFront.Controller;

import MyFramePro.Domain.ResponseResult;
import MyFramePro.Service.Impl.CategoryServiceImpl;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@CrossOrigin    //关于跨域的注解
@RestController
@RequestMapping(value ="/category")
public class CategoryController {

    @Resource
    private CategoryServiceImpl categoryService;

    /**
     * 这里是查询当前的分类信息
     */
    @RequestMapping(value = "/getCategoryList")
    public ResponseResult getCategoryList(){

        return categoryService.getCategoryList();
    }

}
